   VPN
 


  VPN  Windows   ,
 ,    ().


    ,  
 :
*   -    ,   
   .
   VPN.
      :
,        
   .
*  Connect/Disconnect.

  :
- Disconnected:  .
    Connect .
- Connecting: 
   Connecting.  ,
      Disconnected.
   ( , disabled).
- Connected: .
   Connected.  ,
      Disconnected.
   ( , disabled).

  Connected    ,
    IP- .

    OpenVPN,      
     openvpn (   )
   openvpn   .


       NSIS.
  :
-     
-    ,   .
 ,     .

       .
,       ( Windows).

      ,   
.exe    .
 ,   
pre_update.bat
post_update_success.bat
post_update_error.bat
       (    , ).
        ,    .


 
-    (  ,  
  )
-  (   )
- 

HTTP API
     (     
) HTTP- (, HTTPS -      )
  ,        VPN-,
 API     API  VPN-.

POST /api/login HTTP/1.1

  -     application/x-www-form-urlencoded
login
password

  

  200 - ;      .
     HTTP   .

  HTTP-   ;   
     uri.     
  .

GET /api/<session_id>/countries HTTP/1.1

       :
country_code|ping_min|ping_max|bandwidth_min|bandwidth_max\r\n
country_code -    
ping_min -  
ping_max -  
bandwidth_min -  
bandwidth_max -  
        .
     .

GET /api/<session_id>/config/<country_code>

    openvpn     .
     ,  ,   .
  ,        .

DELETE /api/<session_id>/config

        ,     .
 .
      VPN-.

      VPN-,     
  (  )   .


   
    ,  :
-  
-   

 ,   .
      bitcoin.
   ,      ,
  login/password    /  .

      -,    VPN-.
,         :
- IP- (   :   $REMOTE_ADDR,   js)
- 
- email
-   (        js,     -  )
- 
-   (     js)
-   ()
       ,      ( email).

   ,      .
   -     :)   .
          .



     :
*  ,       
+ add
:
- 
- last activity
- IP Address
- expiration date (  )
- edit ()
- block ()

   ,     ,   
  .

 block -    (    ).
  !

*  VPN-
- Source IP Address
- VPN endpoint IP address
- started
- last activity
- disconnect



         " " :)
 !
    -     -   ,
        .
    ,   .
..,    ,     .
    ,   (   
pre_update.bat
post_update_success.bat
post_update_error.bat
   -        )
    -  ,       ,
      .
      -  ,   -      .
   ,      "    ,     ".

   NSIS (   ) -       
 virustotal,     .    -    NSIS
       
https://nsis.sourceforge.io/NSIS_False_Positives
,   ,     ,    
  .
  -    ,       ,
  ,      .    .

      -      ,    .


  VPN

   VPN     :
1.  VPN       .
           IP-
2.    -API     

 ,       ,      VPN (  
   ).   ,       Linux.
